import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

const router = new Router({
    mode: 'history',
    routes: [
    {
        path: '/',
        redirect:'/login'   //设置默认路由
    }, 
    {
        path: '/login',
        component: resolve => require(['@/views/home/login.vue'], resolve)
    }, 
    {
        path: '/index',
        component: resolve => require(['@/views/home/index.vue'], resolve)
    }, {
        path: '/rareInfo',
        component: resolve => require(['@/views/home/rareInfo.vue'], resolve)
    }
    , {
        path: '/accountInfo',
        component: resolve => require(['@/views/home/accountInfo.vue'], resolve)
    }, {
        path: '/geneticTumor',
        component: resolve => require(['@/views/home/geneticTumor.vue'], resolve)
    }, {
        path: '/bodyCell',
        component: resolve => require(['@/views/home/bodyCell.vue'], resolve)
    }, {
        path: '/mySample',
        component: resolve => require(['@/views/home/mySample.vue'], resolve)
    }, {
        path: '/loginInfo',
        component: resolve => require(['@/views/home/loginInfo.vue'], resolve)
    }, {
        path: '/agentList',
        component: resolve => require(['@/views/home/agentList.vue'], resolve)
    }, {
        path: '/agent',
        component: resolve => require(['@/views/home/agent.vue'], resolve)
    }, {
        path: '/hospitalList',
        component: resolve => require(['@/views/home/hospitalList.vue'], resolve)
    }, {
        path: '/hospital',
        name:'hospital',
        component: resolve => require(['@/views/home/hospital.vue'], resolve)
    }, {
        path: '/saveMoney',
        component: resolve => require(['@/views/home/saveMoney.vue'], resolve)
    }, {
        path: '/test',
        component: resolve => require(['@/views/home/test.vue'], resolve)
    },{
        path: '/roleList',
        component: resolve => require(['@/views/home/roleList.vue'], resolve)
    },{
        path: '/role',
        component: resolve => require(['@/views/home/role.vue'], resolve)
    },{
        path: '/roleMenu',
        component: resolve => require(['@/views/home/roleMenu.vue'], resolve)
    },{
        path: '/userRole',
        component: resolve => require(['@/views/home/userRole.vue'], resolve)
    }]
})

export default router;